package com.dongzili.demo.customer.model;


import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.dromara.easyes.annotation.*;
import org.dromara.easyes.annotation.rely.FieldType;

import java.time.LocalDateTime;

/**
* 资源明细
* @TableName f_resource
*/
@DS("wlxt")
@Data
@TableName(value ="f_resource")
@Settings(maxResultWindow = 100000000)
@IndexName(value = "f_resource_index")
public class ResourceModel {
	
	@IndexId(type = org.dromara.easyes.annotation.rely.IdType.CUSTOMIZE)
	@TableId(value="`ID`", type = IdType.AUTO)
    private Long id;

    @IndexField(fieldType = FieldType.KEYWORD, fieldData = true)
    @TableField("`ResCode`")
    private String resCode;

    @TableField("`Title`")
    private String title;

    @TableField("`KeyWord`")
    private String keyWord;

    @TableField("`Des`")
    private String des;

    @TableField("`FPath`")
    private String fPath;

    @TableField("`Fname`")
    private String fname;

    @TableField("`Cover`")
    private String cover;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("`CreateDT`")
    @IndexField( fieldType = FieldType.DATE, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDT;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("`UpdateDT`")
    @IndexField( fieldType = FieldType.DATE, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateDT;

    @TableField("`FSize`")
    private String fSize;

    @TableField("`ThumbnailPath`")
    private String thumbnailPath;

    @TableField("`DLoadTimes`")
    private Integer dLoadTimes;

    @TableField("`DLoadScore`")
    private Integer dLoadScore;

    @TableField("`ClickTimes`")
    private Integer clickTimes;

    @TableField("`SCTimes`")
    private Integer sCTimes;

    @TableField("`Flag`")
    private Integer flag;

    @TableField("`FileExt`")
    private String fileExt;

    @TableField("`MType`")
    private Integer mType;

    @TableField("`Fullpath`")
    private String fullpath;

    /**
     * 资源分类（0资源库，1校本资源，2excel导入，3特殊教育）
     */
    @TableField("`ResType`")
    private Integer resType;

    @TableField("`Author`")
    private String author;

    @TableField("`TermID`")
    private Integer termID;

    @TableField("`SubjectID`")
    private Integer subjectID;

    @TableField("`UserID`")
    private String userID;

    @TableField("`ResStatus`")
    private Integer resStatus;

    @TableField("`Reason`")
    private String reason;

    @IndexField(fieldType = FieldType.KEYWORD, fieldData = true)
    @TableField("`ResYear`")
    private String resYear;

    @TableField("`FileTime`")
    private String fileTime;

    @TableField("`ShowOrder`")
    private Integer showOrder;

    @TableField("`Source`")
    private String source;

    @TableField("`Organ`")
    private String organ;

    @TableField("`Prize`")
    private String prize;

    @TableField("`IsWlxt`")
    private Integer isWlxt;

    @TableField("`Path`")
    private String path;

    @TableField("`VideoPath`")
    private String videoPath;

    @TableField("`ResTime`")
    private String resTime;

    @TableField("`Teacher`")
    private String teacher;

    @TableField("`IsGoodRes`")
    private Integer isGoodRes;

    @TableField("`OrgID`")
    private Integer orgID;

    @TableField("`OnlyOrg`")
    private Integer onlyOrg;

    /**
    * 更新时间
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("`modify_time`")
    @IndexField( fieldType = FieldType.DATE, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime modifyTime;


    /**
    * 匹配度
    */
    @Score
    @IndexField(exist = false)
    @TableField(exist = false)
    private Float matchScore;
    /**
     * 资源关联关系id
     */
    @IndexField(exist = false)
    @TableField(exist = false)
    private Long relationId;

    /**
     * 是否可下载
     */
    @IndexField(exist = false)
    @TableField(exist = false)
    private Long isDownload;

    /**
     * 操作员
     */
    @IndexField(exist = false)
    @TableField("`operator`")
    private String operator;


}
